package com.aceitunaproject.server.message;

import java.nio.ByteBuffer;

import com.aceitunaproject.server.player.Player;
import com.aceitunaproject.shared.message.Message;

/**
 * Message handler interface
 * 
 * @author Maciej Miechowicz
 */
public interface MessageHandler {

	/**
	 * Handles a binary message received by the given player
	 * 
	 * @param player player receiving the message
	 * @param message received message
	 */
	public void handleBinaryMessage(Player player, ByteBuffer message);
	
	/**
	 * Handles an object message received by the given player
	 * 
	 * @param player player receiving the message
	 * @param message received message
	 */
	public void handleObjectMessage(Player player, Message message);
	
}
